#include <yaml-cpp/yaml.h>
#include <iostream>
#include <vector>
#include "Single.h"

using std::vector;
using YAML::Node;
using YAML::LoadFile;

int main(int argc, char *argv[]){
  const Node &exp = LoadFile("../skt/config/exp.yaml");
  const string cfile = "../skt/config/yaml/" + exp["single"].as<string>();
  const Node &c = LoadFile(cfile);

  vector<PN *> pv;
  // add slave PXI crates //
  if(c["single"]){ // single console
    Single *s = new Single(c["single"]);
    pv.push_back(s);
    s->Ln();
  } // end if

  for(auto &p : pv) p->Generate();
  for(auto &p : pv) delete p;

  return 0;
} // end main function
